package com.usian.day01.job;

import com.usian.common.model.day01.User;
import com.usian.day01.mapper.UserMapper;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author baimugudu
 * @email 2415621370@qq.com
 * @date 2023/8/10 8:35
 */
@Component
@Slf4j
public class FindAllUserJob {

    @Autowired(required = false)
    UserMapper userMapper;

    @XxlJob("findAllUserJobHandler")
    public void findAllUser(){
        List<User> users = userMapper.selectList(null);
        users.forEach(i->{
            log.info("i:{}",i.toString());
        });

    }
}
